<!--
 * @Author: ykp 501436989@qq.com
 * @Date: 2025-04-29 10:17:14
 * @LastEditors: ykp 501436989@qq.com
 * @LastEditTime: 2025-08-14 15:53:27
 * @FilePath: \vue-ts\src\views\todolist\components\cardType.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div :class="typeArr.find(item => item.id == props.crdType) ? typeArr.find(item => item.id == props.crdType).bgColor : ''"
    class="rounded-full min-w-10 w-max h-4  m-1 text-white inline-block px-2 text-xs text-center">
    {{typeArr.find(item => item.id == props.crdType) ? typeArr.find(item => item.id == props.crdType).label : ''}}
  </div>
</template>

<script setup lang="ts">
name: "cardType";
import { color } from "echarts";
import { ref, reactive, computed } from "vue";
// import { defineEmits } from "vue"; //引入emit
import { defineProps } from "vue"; //引入props
import { defineExpose } from "vue"; //引入expose
const emit = defineEmits(["onStatus"]);
import { taskCategory } from "../js/gojson";
const props = defineProps({
  crdType: {
    type: String,
    default: '', //任务类型下标
  },
});
let typeArr = taskCategory
</script>

<style scoped></style>